# Maintainer: omni <omni+alpine@hack.org>
pkgname=zfsbootmenu
pkgver=2.3.0
pkgrel=1
pkgdesc="ZFS Bootloader for root-on-ZFS systems, this aport is work in progress"
#pkgdesc="ZFS Bootloader for root-on-ZFS systems with support for snapshots and native full disk encryption"
url="https://zfsbootmenu.org/"
arch="all !riscv64" # riscv64 blocked by dracut & kexec-tools
license="MIT"
depends="bash
	fzf
	kexec-tools
	ncurses
	perl-boolean
	perl-sort-versions
	perl-yaml-pp
	pigz
	zfs
	"
makedepends="dracut"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/zbm-dev/zfsbootmenu/archive/refs/tags/v$pkgver.tar.gz"
options="!check"

case "$CARCH" in
arm*)
	# no mbuffer
	;;
*)
	depends="$depends mbuffer"
	;;
esac

package() {
	# Makefile:
	# install: core dracut initcpio zbm-release
	make DESTDIR="$pkgdir" core dracut zbm-release
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
9b8e2d5ea258a32cd09a9382faaa21beea54f2ed825fa747f10ffe0b9f191c257b023019ec76dc882e649e8ea6fcd8e310632bba6c783228c594e3d0fee2c9c8  zfsbootmenu-2.3.0.tar.gz
"
